﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Selector - Form Filter</title>
    <script src="script/jquery-1.3.2.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(document).ready(function() {
            // filter disabled
            $("input:disabled").val("Disabled");
            
            // filter enabled
            $("input:enabled").val("Enabled");

            // filter checked
            var n = $("input:checked").length;
            $("div").text(n + (n == 1 ? " is" : " are") + " checked!");

            // filter selected
            var s = $("select option:selected").length;
            $("span").text(s + (s == 1 ? " is" : " are") + " selected!"); 
        });
    </script>
</head>
<body>
<form> 
    Disable :<input type="text" name="email" disabled="disabled" /> 
    <br />
    Enable : <input type="text" name="id" /> 
    <br />
    <input type="checkbox" name="newsletter" checked="checked" value="Hourly" /> 
 
    <input type="checkbox" name="newsletter" value="Daily" /> 
    <input type="checkbox" name="newsletter" value="Weekly" /> 
 
    <input type="checkbox" name="newsletter" checked="checked" value="Monthly" /> 
    <input type="checkbox" name="newsletter" value="Yearly" /> 
    <div></div>
    
    <select name="garden" multiple="multiple"> 
        <option>Flowers</option> 
        <option selected="selected">Shrubs</option> 
        <option>Trees</option> 
        <option selected="selected">Bushes</option> 
        <option>Grass</option> 
        <option>Dirt</option> 
    </select> 
    <span></span>
  </form>
  
</body>
</html>
